package com.cskaoyan.model.vo.comment.commentlist;

import com.cskaoyan.bean.MallComment;
import lombok.Data;

import java.util.List;

/**
 * @program: project-market
 * @description:
 * @author: Jesson Guo
 * @create: 2021-12-01 22:15
 **/
@Data
public class CommentPageVO {
    private Integer total;
    private Integer pages;
    private Integer limit;
    private Integer page;
    private List<MallComment> list;

    public CommentPageVO(int total, int limit, int page, List<MallComment> list) {
        this.total = total;
        this.limit = limit;
        this.page = page;
        this.list = list;
        if (total % limit != 0) {
            this.pages = total / limit + 1;
        } else {
            this.pages = total / limit;
        }
    }
}
